#include "widget.h"
#include "ui_widget.h"
#include<QDebug>

Widget::Widget(QWidget *parent)
    : QWidget(parent)
    , ui(new Ui::Widget)
{
    ui->setupUi(this);
}

Widget::~Widget()
{
    delete ui;
}


void Widget::on_textEdit_textChanged()
{
    qDebug()<<"textChanged";
    QString s=ui->textEdit->toPlainText();
//    qDebug()<<s;
    ui->label->setText(s);
}

void Widget::on_textEdit_selectionChanged()
{
    qDebug()<<"selectionChanged";
}

void Widget::on_textEdit_cursorPositionChanged()
{
    qDebug()<<"cursorPositionChanged";
}

void Widget::on_textEdit_undoAvailable(bool b)
{
    qDebug()<<"undoAvailable(bool b)"<<b;
}

void Widget::on_textEdit_copyAvailable(bool b)
{
    qDebug()<<"copyAvailable(bool b)"<<b;
}
